package com.doit.day01

import java.util.Random


object _03_类型转换 {
  def main(args: Array[String]): Unit = {
    val a:Long = 10

    val b :Int = a.toInt


    //想变什么就to什么，前提条件是能变得过去
/*    val  str = "hello"
    val int: Int = str.toInt
    println(int)*/

    val random: Random = new Random()
    val num: Int = random.nextInt(10)
    if(num >=5){
      println("下课")
    }else if(num > 3){
      println("加班")
    }else{
      println("放假")
    }





  }

}
